# from flask import Blueprint, request,Response
# from langchain_core.prompts import ChatPromptTemplate
# from pojo.result import Result  # 所有的依赖必须从根目录开始引入
# from langchain_community.chat_models import ChatOpenAI
# from langchain.prompts import PromptTemplate
# import  requests
# import json
# import time
# """sqlalchemy 操作mysql数据库"""
# from sqlalchemy import create_engine, Table, MetaData
# from sqlalchemy.orm import Session
# from sqlalchemy import Column, Integer, String, create_engine
# from sqlalchemy.ext.declarative import declarative_base
# from sqlalchemy.orm import sessionmaker
# from langchain.chains import LLMChain
# from configuration.Config import model,temperature
from langchain_openai import OpenAI
from langchain_community.chat_models import ChatAnthropic

llm = OpenAI(model="Qwen1.5-7B-Chat", temperature=0.7, max_tokens=1024,base_url="http://192.168.0.194:20000/v1",api_key = "EMPTY")
 # base_url=base_url, streaming=True,
for chunk in llm.stream("介绍一下奥巴马"):
    # print(chunk, end="", flush=True)
    print(chunk, flush=True)